/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UCM;

import Source.DisplayEditFlight;
import Views.ViewDisplayEditFlight;

/**
 *
 * @author Joshua King
 */
public class UCDisplayEditFlight implements UCController {
    
    private ViewDisplayEditFlight view;
    private DisplayEditFlight model = new DisplayEditFlight();
    

    /**
     * Initialises the view.
     * @param view
     */
    public UCDisplayEditFlight(ViewDisplayEditFlight view) {
        this.view = view;
        view.loadTo(model);
    }

    /**
     * Precondition: user is logged in as manager
     * 1. Users clicks on the edit flight.
     * 2. System gets data on flights.
     * 3. System displays edit flight view.
     * Postcondition: user is on edit flight page.
     */
    public void run() {
        // 2. System gets data on flights.
        model.retrieveData();
        // 3. System displays edit flight view.
        view.setEditFlightVisible();
    }

}
